#include "stdafx.h"

#pragma comment(lib, "d3d9.lib") 
#pragma comment(lib, "d3dx9.lib") 

#include <d3d9.h>


HRESULT InitD3D(HWND hWnd, LPDIRECT3D9 &g_pD3D, LPDIRECT3DDEVICE9 &g_pd3dDevice);

VOID Cleanup(LPDIRECT3D9 &g_pD3D, LPDIRECT3DDEVICE9 &g_pd3dDevice, LPDIRECT3DVERTEXBUFFER9 &g_pVB, LPDIRECT3DINDEXBUFFER9 &pBufferIndex);

VOID Render(LPDIRECT3DDEVICE9 &g_pd3dDevice, LPDIRECT3DVERTEXBUFFER9 &g_pVB, LPDIRECT3DINDEXBUFFER9 &pBufferIndex, POINT &pMouse, POINT &pMouseOld, float &g_fSpinX, float &g_fSpinY, float &g_fDistance);

HRESULT InitGeometry(LPDIRECT3DDEVICE9 &g_pd3dDevice, LPDIRECT3DVERTEXBUFFER9 &g_pVB);

VOID SetupMatrices(LPDIRECT3DDEVICE9 &g_pd3dDevice);

